package com.oig.sys.auth.util;

import com.oig.common.constants.CommonConstants;
import com.oig.common.util.JsonUtil;
import com.oig.sys.auth.dto.ResourceGQLCondDto;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;

public class SystemUtil {

    public static void main(String[] args){

//        String pwd = "sys_secret_r12" ;
        BCryptPasswordEncoder bCryptPasswordEncoder = new BCryptPasswordEncoder();
        String enpwd = bCryptPasswordEncoder.encode("123456");
//        String enpwd2= bCryptPasswordEncoder.encode(pwd);
//
        System.out.println(enpwd);
//        System.out.println(enpwd2);
//
//        System.out.println(bCryptPasswordEncoder.matches(pwd, enpwd));
//        System.out.println(bCryptPasswordEncoder.matches(pwd, enpwd2));
//
//        String  str = "冻的鸡整翅（翼） (沿肩关节将鸡翅从整鸡上分割下来的部位)" ;
//        System.out.println(str.substring(0,str.indexOf("（")));
//        String str = "group_concat(o.`cabinet_no`)";
//        System.out.println(str.substring(str.indexOf(CommonConstants.LEFT_PARENTHESIS)+1,str.indexOf(CommonConstants.RIGHT_PARENTHESIS)));
//
//        System.out.println(DateUtil.beginOfWeek(new Date(), true));

//        String json = "[{\"fieldName\":\"status\",\"symbol\":\"$nin\",\"value\":[05,06,07]},{\"fieldName\":\"paymentType\",\"symbol\":\"$in\",\"value\":['D/P','D/A','CAD']}]";
//        System.out.println(JsonUtil.toList(json, ResourceGQLCondDto.class));

//        StringBuilder sb = new StringBuilder();
//        sb.append("sdfjdskf").append(CommonConstants.SPLIT_STR);
//        System.out.println(sb.substring(0,sb.length()-1));

    }

}
